import { usePermissionStore } from '@/stores/permission'
import { computed } from 'vue'
import { useRoute } from 'vue-router'

export default function useButtonAuth() {
  const id = useRoute().meta.id
  const store = usePermissionStore()
  return computed(() => {
    return id ? store.buttonAuth.get(id) ?? new Set() : new Set()
  })
}
